#include <GL/glut.h>

void myDisplay(void) {
	glClear(GL_COLOR_BUFFER_BIT);
	glRectf(-0.5f, -0.5f, 0.5f, 0.5f);
	glFlush();
}

int main(int argc, char *argv[]) {
	// create a window
	glutInit(&argc, argv);	
	glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE);
	glutInitWindowSize(500, 500);
	glutCreateWindow("第一个 OpenGL 程序");

	// Initialization
	//init();

	// Define callback functions
	// glutDisplayFunc(&myDisplay);
	glutDisplayFunc(myDisplay);

	// Main program loop. (Event loop)
	glutMainLoop();

	return 0;
}
